Repository navigation
fix(lint)!: four publish-time checks for data-model metadata that saves and does not work - #37513
objectstack-fleet[bot] wants to merge 6 commits into
Conversation
…es and does not work Two errors refuse the publish and fail os validate: a summary whose child has no field pointing back to the parent (rollup/child-without-parent-reference), and a reference on a field type that reads none (field/reference-on-non-reference-type). Two warnings refuse nothing: a lookup named like a count or total (field/count-named-lookup), and a lookup child drawn as a body table on a record a locking approval holds (approval-detail-editable-while-pending). A formula reading an unconfigured summary stays covered by field/summary-without-operations, pinned here. Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 6 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin c17d8f09197884df29c31bca9bec6f2cecc7db9b && git checkout c17d8f09197884df29c31bca9bec6f2cecc7db9b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1af67b26cdf5c6850a4cff8b44a94cf46b7a2502 ad43f0b457457c90866eb2d7418d373ffb9fdfe3 && git checkout -B drift-repro 1af67b26cdf5c6850a4cff8b44a94cf46b7a2502 && git merge --no-ff ad43f0b457457c90866eb2d7418d373ffb9fdfe3
node scripts/docs-audit/affected-docs.mjs --json 1af67b26cdf5c6850a4cff8b44a94cf46b7a2502
|
…ack to its parent The own-currency roll-up is meant to be refused by the mixed-currency door alone. Its child carried no field referencing the roll-up's object, so the new rollup/child-without-parent-reference check refused the source save first. Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract-review-claim: session_01Q4EjjQkY5yXZrN9BEA3rEK · head 77ac3ce · 2026-11-26T11:03Z |
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract reviewServed-tier: Face: the file list holds one published-schema path (the ADR-0087 entry, the first path on the Scope line), and the PR body and the changeset declare ① Derived judgmentsEach check was read against the code it cites at this head. Both refusals are true of the engine. One of them ships ahead of the platform's own designer (M1) and states a consequence that is wrong for part of its set (S1).
② Semver level
③ Boundary flags
④ Design judgmentAgainst card #35143, Data model family only. M1 (must-fix) — the console's own field designer writes the shape
S1 (should-fix) — the record-picker sentence is wrong for
S2 (should-fix) — the relation arm throws where the engine's scan catches, and the throw takes the aggregand refusals with it.
Nits, none with an effect on correctness or the contract:
Card lines, not PR defects, for the seat to record on #35143: D2 is covered by Open: must-fix M1, should-fix S1, should-fix S2. Implemented-by: VERDICT: FAIL |
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK L1 review — PR #37513 at VERDICT: REVISE Read by an agent that did not write the code. Mechanical face: Rework, in order
PR shape and card relation: ok
Scope and changeset
Tests and gates
Premise
|
…t; the relation arm reads past an unreadable carrier The field/reference-on-non-reference-type message adds the record-picker clause only for types the inline editor routes to its reference branch (text, number, date and the like), not for select, boolean, the file-backed types, markdown or textarea. pointsBackTo treats a non-string reference as not pointing back, as the engine's foreign-key scan does, so one unreadable sibling no longer throws the whole roll-up entry and its aggregand refusals. The changeset's Skills-docs line names follow-up #37529. Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
… type that reads none, and reads a stored one away changeType drops reference when the next type is none of lookup, master_detail, tree, user and summary, as it drops the picklist binding, option kinds, referenceNameVisible and deleteBehavior. The designer's read door strips a reference from a field whose declared type reads none, so a draft an earlier build wrote that way saves without it on the next edit and the new publish refusal no longer strands it. Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
…es at module top Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract-review-claim: session_01Q4EjjQkY5yXZrN9BEA3rEK · head ad43f0b · 2026-11-26T13:35Z |
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract reviewServed-tier: Delta round by the reviewer of record 7190867118 (FAIL at Face: the file list (22 paths) holds one published-schema path (the ADR-0087 entry, the first path on the Scope line), and the PR body and the changeset declare ① Derived judgmentsEach check was read against the code it cites at this head. Both refusals are true of the engine, the platform's own designer no longer writes the refused shape, and the published sentences now hold.
② Semver level
③ Boundary flags
④ Design judgmentAgainst card #35143, Data model family only. Findings of record 7190867118, re-judged at this head: M1 (must-fix): CLOSED.
S1 (should-fix): CLOSED.
S2 (should-fix): CLOSED.
Nits, none with an effect on correctness or the contract:
Card lines for #35143 are already on the card in 7190889569. Open: none at must-fix or should-fix. Nits N1, N4, N6, N7, N8 and N9 are recorded for a follow-up card. Implemented-by: VERDICT: PASS |
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK 席位核对L1 delta — PR #37513 at VERDICT: ACCEPT Read by an agent that did not write the code. Mechanical face: The five rework items
Sentences read (changeset and docs faces, sentence by sentence)
For the seat at ACCEPT, none of it moves the head
PR shape and card relation: ok
Scope and changeset
Tests and gates
|
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract reviewServed-tier: Delta round by the reviewer of record 7190867118 (FAIL at Face: the file list (22 paths) holds one published-schema path (the ADR-0087 entry, the first path on the Scope line), and the PR body and the changeset declare ① Derived judgmentsEach check was read against the code it cites at this head. Both refusals are true of the engine, the platform's own designer no longer writes the refused shape, and the published sentences now hold.
② Semver level
③ Boundary flags
④ Design judgmentAgainst card #35143, Data model family only. Findings of record 7190867118, re-judged at this head: M1 (must-fix): closed.
S1 (should-fix): closed.
S2 (should-fix): closed.
Nits, none with an effect on correctness or the contract:
Card lines for #35143 are already on the card in 7190889569. No must-fix, no should-fix. Nits N1, N4, N6, N7, N8 and N9 are recorded for follow-up card #37577. Implemented-by: VERDICT: PASS |
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK 维护者速读
席位意见:两级审核在这个 head 上都通过(L1 ACCEPT 7193959285,契约审核 PASS 7194461560,上一轮 FAIL 的 M1/S1/S2 均已关闭),CI 全绿;剩余小问题立卡 #37577。建议批准。 席位核对 — ACCEPT · repo:objectstack#6 · head
|
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Review requested: this narrowing PR lands by an authorized approval. Seat record above (ACCEPT at head |
Part of #35143
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37529
维护者速读
What changes
The Data model family of the card's second batch of publish-time checks, five lines, each verified on
origin/mainfirst.field/count-named-lookupfield/summary-without-operationsrefuses the summary itselfrollup/child-without-parent-reference, added to the existinglintSummaryRollupsreferenceon a type that reads nonefield/reference-on-non-reference-typeapproval-detail-editable-while-pending, added to the existingvalidateApprovalApproversbuildSummaryIndex). It readssummaryOperations.relationshipFieldwhen that is set. Otherwise it looks for the firstmaster_detail/lookupon the child that references the parent. When the index finds no foreign key, the summary is skipped with nothing logged, so the field reads 0 or empty while every child write reports success.owner_id,created_byandupdated_byback tosys_user, plus the tenancy lookups).referencesits on any type outsideREFERENCE_VALUE_TYPESplussummary.summaryis exempt because the hosted blueprint readssummary+reference.referenceto the record picker, except the textual fallback types. For text, number and date fields the message therefore names the record-id write; a select and the other types the inline editor routes first are told only that the key links nothing.lintFieldReferenceShapes, which runs on both theobjectand theobject_extensiondoor. D1 is a warning, so it comes back as a 2xx advisory.lockRecordnot set tofalsemakes the rule look at the flow's start object. If that object has a non-multiplelookupchild drawn as a body table (relatedList: 'primary', read throughisBodyTableRelationship), the rule warns once per flow. The approval lock coversmaster_detailchildren only.publish-refuses-data-model-fields-that-save-and-do-not-workin@objectstack/spec. It is a notice only, because each fix is a choice only the author can make.Tests
data-model-rules.field-reference-shapes.test.ts(new) covers D4 and D1:objectand onobject_extension, and returns D1 as an advisory.data-model-rules.summary-rollup.test.tscovers D3:relationshipFieldthat names no field of the child;master_detail, withlookup, with arelationshipFieldthat names a real child field, when the child is absent, forsys_uservia the injected column, and for a foreign key added by an extension on the CLI;validate-functional-completeness.test.tscovers D2: a bare summary that a formula reads is refused at the gate asfield/summary-without-operations.validate-approval-approvers.test.tscovers D5:master_detailchild, a non-body lookup andlockRecord: false;lintFieldReferenceShapesis added to the exactrulesRunlists in three runtime-gate test files.Acceptance notes
Clause-②: notogether withMetadata-protocol: narrowed. The changeset gate refusesnarrowedwithout the(narrowing)arm. Two of the checks refuse a publish that used to be accepted, so the change narrows. This PR therefore carriesClause-②: no (narrowing)and a!title, the same as the Flows precedent.summaryOperationsis already refused as itself, so the formula that reads it cannot publish either. That is recorded and pinned.summary, because the hosted blueprint readssummary+reference.formulaandautonumberstill fire, but their message drops the record-picker clause because they have no editor.os validate --strictexit 1, as any warning does. D1 rides the object door as a gating-rule warning, so it comes back as an advisory, not a refusal.lintDataModel). R8 countsrefOf(def), and the keysoptionsFrom/dataSource, as select option sources. Neither key exists in the spec. This is a carrier note and is not filed.authoring-rules.tsmerges cleanly.Verification
Two-minute check:
pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/data-model-rules.field-reference-shapes.test.ts src/data-model-rules.summary-rollup.test.ts. Expect every case to pass.Read first, by risk:
packages/lint/src/data-model-rules.ts, the D3 relation arm insummaryRollupFindings. It must agree with the engine's foreign-key choice, or it refuses roll-ups that compute.packages/lint/src/authoring-rules.ts: the new entry's doors (object,object_extension) and the served-fields map passed to the roll-up check.packages/lint/src/validate-approval-approvers.ts: the body-table reading for D5.Readings at final head ad43f0b: lint 237/237 files, 9682 tests (at 2740a17); app-shell narrowed set 221/221 files, 2429 tests (at 48d632c) plus the retype pin file at ad43f0b; dogfood battery 487 passed, 3 skipped files, 4129 passed, 68 skipped tests; CI 63 success, 11 skipped, 0 failed (after the body edit re-ran four jobs).
Follow-ups from the contract review nits: #37577.
Also in this PR: 77ac3ce gives the objectql duplicatePackage roll-up fixture's child a foreign key back to its parent (the new rollup/child-without-parent-reference refusal turned that stale fixture red); 48d632c and ad43f0b make the console field designer drop reference on a retype to a type that reads none and strip a stored one at its read door (contract review M1, under the seat's scope line 7190889569), with its own @object-ui/app-shell patch changeset.
Earlier local readings (head b26f2c1, tree identical to the readings' tree 4e2ea58)
@objectstack/lintfull suite, under the lock: Test Files 237 passed (237), Tests 9680 passed (9680), VERDICT command-exit 0.os validateon app-crm, app-multi-package, app-showcase, app-starter and app-todo: each "Validation passed", with zero findings from the four new checks.dispatch-gates.mjs --commands), the full dogfood battery and the CI check-runs are read in the os-dev-report comment on the card.Generated by Claude Code